let that
// 获取元素
const shadow = document.getElementById('shadow')
const radius = document.getElementById('radius')
const score = document.getElementById('score')
// console.log(shadow, radius, score)
// 设置点击事件
document.querySelector('#scrollBar').addEventListener('click', function (e) {
  // console.log(e.pageX / 300)
  const pos = (e.pageX / 300).toFixed(2) * 100
  // console.log(pos)
  radius.style.left = `${pos - 5}%`
  shadow.style.width = `${pos}%`
  score.innerHTML = `${pos}`
})
shadow.addEventListener('click', function (e) {
  const pos = (e.pageX / 300).toFixed(2) * 100
  // console.log(pos)
  radius.style.left = `${pos - 5}%`
  shadow.style.width = `${pos}%`
  score.innerHTML = `${pos}`
})
